package pantallas;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class IngresoDemoraView extends javax.swing.JFrame {
	private JLabel lblIngresoDemora;
	private JTextField txtDemora;
	private JButton cmdAceptar;
	private JButton cmdCancelar;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				IngresoDemoraView inst = new IngresoDemoraView();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public IngresoDemoraView() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			getContentPane().setLayout(null);
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				lblIngresoDemora = new JLabel();
				getContentPane().add(lblIngresoDemora);
				lblIngresoDemora.setText("Ingresar Tiempo de Demora");
				lblIngresoDemora.setBounds(11, 16, 310, 14);
			}
			{
				txtDemora = new JTextField();
				getContentPane().add(txtDemora);
				txtDemora.setBounds(176, 13, 114, 21);
			}
			{
				cmdAceptar = new JButton();
				getContentPane().add(cmdAceptar);
				cmdAceptar.setText("Aceptar");
				cmdAceptar.setBounds(5, 50, 103, 21);
				cmdAceptar.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						System.out.println("cmdAceptar.actionPerformed, event="+evt);
						JOptionPane.showMessageDialog(null, "Tiempo invalido.");
					}
				});
			}
			{
				cmdCancelar = new JButton();
				getContentPane().add(cmdCancelar);
				cmdCancelar.setText("Cancelar");
				cmdCancelar.setBounds(176, 50, 109, 21);
			}
			pack();
			//MEDIDAS Y CENTRALIZACION DE LA PANTALLA.
	        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
	        int w = this.getSize().width;
	        int h = this.getSize().height;
	        int x = (dim.width-w)/2;
	        int y = (dim.height-h)/2;
	        this.setLocation(x, y);
			this.setSize(310, 109);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

}
